// index.js
const uiAvatarControls = require("./ui-avatar-controls");
Component({
    options: {
        multipleSlots: true,
        addGlobalClass: true
    },
    relations: {
        'uiAvatarControls': {
            type: 'descendant', // 关联的目标节点应为子孙节点
            target: uiAvatarControls,
            linked: function(target) {
                const that = this;
                target.setData({
                    reverse: that.data.reverse,
                    size: that.data.size,
                    type: that.data.type,
                })
            }
        }
    },
    /**
     * 组件的属性列表
     */
    properties: {
        reverse: {
            type: Boolean,
            value: false
        },
        // 尺寸 xs: 20, sm: 24, df: 28, lg: 32, xl: 36, xxl: 44, sl: 80, xsl: 120
        size: {
            type: String,
            value: 'normal'
        },
        // 形状 circle: 圆形, square: 正方形, round: 圆角
        type: {
            type: String,
            value: 'circle'
        }
    },

    /**
     * 组件的初始数据
     */
    data: {

    },

    /**
     * 组件的方法列表
     */
    methods: {

    }
})